package com.xmall.member.controller;

import com.xmall.annotation.LoginRequiredFalse;
import com.xmall.define.base.Result;
import com.xmall.define.dto.login.MemberDto;
import com.xmall.member.service.IMemberService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/service/member/member")
@RestController
public class MemberController {

    @Resource
    private IMemberService memberService;

    /**
     * 详情
     */
    @LoginRequiredFalse
    @RequestMapping("/info/{id}")
    public Result<MemberDto> info(@PathVariable("id") Long id) {
        MemberDto dto = memberService.info(id);
        return Result.success(dto);
    }
}
